'use strict';

module.exports = options => {
  console.log('options:', options);
  return async (ctx, next) => {
    if (ctx.session.openId) {
      await next();
    } else {
      ctx.body = { data: '未登录' };
    }
  };
};
